home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6860 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: vb.franken.de!volker
  2. From: volker@vb.franken.de (Volker Barthelmann)
  3. Subject: Re: 680X0 -> PPC translator?
  4. Newsgroups: comp.sys.amiga.programmer
  5. References: <volker.0g32@vb.franken.de> <315C198B.49C2@netvision.net.il> <volker.0g5w@vb.franken.de> <1996Apr2.230841.8275@scala.scala.com>
  6. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  7. Message-ID: <volker.0g8b@vb.franken.de>
  8. Date: 3 Apr 96 23:15:40 MET
  9. Organization: home
  10.  
  11. Dave Haynie (dave.haynie@scala.com) wrote:
  12. :
  13. : >Unfortunately You have to know about all other memory areas as well,
  14. : >because otherwise You cannot determine what is code and what is data.
  15. :
  16. : Sure you can. The practical binary translators that exist today (and
  17. : there are some, which work very well) do this very simply. They work
  18. : in conjunction with an emulator, and the emulator keeps track of what
  19. : runs and what doesn't. Anything that's executed is code, and such a
  20. : chunk can itself be translated based on static analysis. Anything that
  21. : doesn't run might not be code. So you don't translate it; if it's
  22. : data, you're safe. If it's code, and it never runs, there's no point
  23. : in translating it. If it does run later, you translate it later.
  24.  
  25. But that's not what we were talking about! We were talking about a static
  26. and complete translation of 68k to PPC before it is executed.
  27.  
  28. : >Think about: The program writes a value somwhere. Then copies it around,
  29. : >shifts it, moves it again etc. and than sometimes it reads it from where
  30. : >it is now, loads it in a0 and does a jmp (a0) or so.
  31. :
  32. : The AmigaOS and the 680x0 don't support self-modifying code.
  33.  
  34. I was not talking of self-modifying code there. Only the address of the
  35. code is modified and copied around, but a static translator would have
  36. to know where the jump goes to in order to decide what's code.
  37.  
  38. Sorry if this was not clear.
  39.  
  40. : >Still I claim You can't even reliably decide what is code and what is data.
  41. : >Even if self-modifying code is forbidden.
  42. :
  43. : You can, using dynamic flow analysis. DEC does this, quite
  44.  
  45. Again, I was talking about static translation.
  46.  
  47. : So basically, stop the arguments, I'm offering an existance proof.
  48.  
  49. Not for static translators.
  50.  
  51. Volker
  52.  
  53.